<div class="panel panel-default sidebar-menu">
    {{ $related := .Site.RegularPages.Related . | first 5 }} {{ with $related }}
    <div class="panel-heading">
     <h3 class="panel-title">相关文章</h3>
    </div>
    <div class="panel-body">
     <ul class="nav nav-pills nav-stacked">
        {{ range . }}
        <li><a href="{{ .RelPermalink }}"><i class="fa fa-link"></i>{{ .Title }}</a></li>
         {{ end }}
     </ul>
    </div>
     {{ end }}
</div>